/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dk.hojlind.hackhunt.view;

import java.util.Vector;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Dragon
 */
public class AdvisoryTableModel extends DefaultTableModel
{
    /**
     * default constructor
     */
    public AdvisoryTableModel()
    {
        //default constructor
    }
    
    /**
     * constructor
     * @param data the entries in the table
     * @param columnNames the names of the columns
     */
    public AdvisoryTableModel(Object[][] data, Object[] columnNames)
    {
        setDataVector(data, columnNames);        
    }    
    
    /**
     * adds a line to the table
     * @param line 
     */
    public void addLine(String line)
    {
        Vector row = new Vector();
        row.add(line);
        this.addRow(row);
    }
    
    @Override
    /**
     * override-method to make table clickable without invoking the cell editor
     * @return false regardless of paramter
     */    
    public boolean isCellEditable(int row, int column)
    {
        return false;
    }
}
